
define(["_"], function(_) {
  var exports, trim;
  trim = function(input) {
    if (String.prototype.trim) {
      return input.trim();
    } else {
      return input.replace(/^\s+/, '').replace(/\s+$/, '');
    }
  };
  return exports = {
    startsWith: function(string, pattern) {
      return (string.lastIndexOf(pattern)) === 0;
    },
    trim: trim,
    isBlank: function(input) {
      if (input === null) {
        return true;
      }
      if (_.isArray(input)) {
        return input.length === 0;
      }
      return (exports.trim(input)).length === 0;
    },
    split: function(str) {
      return _(str.split(" ")).reject(function(s) {
        return s === "";
      });
    }
  };
});
